package com.kt.app.ui.components


import android.util.Log
import androidx.compose.material3.Switch
import androidx.compose.runtime.Composable

import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.runtime.getValue
import androidx.compose.ui.tooling.preview.Preview

@Composable
fun SwitchSample() {
    var isChecked by remember {
        mutableStateOf(false)
    }
    Switch(
        checked = isChecked,
        onCheckedChange = {
            Log.i("SwitchSample", "isChecked: $it")
            isChecked = it
        }
    )
}

@Preview
@Composable
fun SwitchSamplePreview() {
    SwitchSample()
}

